﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
    xmlns:extended="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
    xmlns:localAppCal="clr-namespace:SLControlLibrary.Resources.Controls.Calendar.OutlookCalendar"
    xmlns:localButtons="clr-namespace:SLControlLibrary.Resources.Controls.Calendar.Buttons"
    xmlns:localDatePicker="clr-namespace:SLControlLibrary.Resources.Controls.Calendar.DatePicker">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/SLControlLibrary;component/Resources.Styles/OutlookCalendar_StaticResources.xaml" />
        <ResourceDictionary Source="/SLControlLibrary;component/Resources.Styles/ButtonStyles.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <!-- Outlook Calendar -->
    <Style TargetType="localAppCal:ucCalendar">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localAppCal:ucCalendar">
                    <Grid>
                        <Border
                            BorderBrush="{StaticResource brushBorderBrush}"
                            BorderThickness="1"
                            Margin="25">
                            <extended:DockPanel
                                LastChildFill="True"
                                Background="#F0F1F2">
                                <localAppCal:ucHeader
                                    x:Name="_Header"
                                    CurrentDate="{TemplateBinding CurrentDate}"
                                    CurrentDateView="{TemplateBinding CurrentDateView}"
                                    extended:DockPanel.Dock="Top" />

                                <localAppCal:ucDaysOfWeek
                                    x:Name="_DaysOfWeek"
                                    Height="19"
                                    extended:DockPanel.Dock="Top"
                                    CurrentDate="{TemplateBinding CurrentDate}"
                                    CurrentDateView="{TemplateBinding CurrentDateView}"
                                    CurrentDateBorderBrush="{StaticResource brushDayHeaderSelectedBorder}"
                                    CurrentDateBorderThickness="1"
                                    CurrentDateBackground="{StaticResource brushDayHeaderSelected}"
                                    ContentBackground="{StaticResource brushDayHeaderNormal}"
                                    ContentBorderBrush="{StaticResource brushDayHeaderNormalBorder}"
                                    ContentBorderThickness="1"
                                    />

                                <localAppCal:ucContent
                                    x:Name="_Content"
                                    ContentHeight="22"
                                    CurrentDate="{TemplateBinding CurrentDate}"
                                    CurrentDateView="{TemplateBinding CurrentDateView}"
                                    DayAppointmentBackground="{StaticResource brushDayAppointmentBackground}"
                                    DayAppointmentForeground="{StaticResource brushDayAppointmentForeground}"
                                    DayAppointmentBorderBrush="{StaticResource brushDayAppointmentBorderBrush}"
                                    DayAppointmentBorderThickness="1"
                                    DayContentNonWorkHoursBackground="{StaticResource brushDayNonWorkingHoursBackground}"
                                    DayContentWorkHoursBackground="White"
                                    DayContentBorderBrush="{StaticResource brushDayHourBorderBrush}"
                                    DayContentBorderThickness="1,0,1,1"
                                    DayContentForeground="{StaticResource brushDayContentForeground}"
                                    DayContentHoverBorderBrush="{StaticResource brushDayContentHoverBorderBrush}"
                                    DayContentHoverBackground="{StaticResource brushDayContentHoverBackground}"
                                    DayContentHoverBorderThickness="2"
                                    WeekContentBackground="{StaticResource brushWeekContentBackground}"
                                    WeekContentBorderBrush="{StaticResource brushWeekContentBorderBrush}"
                                    WeekContentBorderThickness="1"
                                    WeekCurrentDateBackground="{StaticResource brushWeekCurrentDateBackground}"
                                    WeekCurrentDateBorderBrush="{StaticResource brushWeekCurrentDateBorderBrush}"
                                    WeekCurrentDateBorderThickness="1"
                                    MonthContentHeaderForeground="{StaticResource brushMonthContentHeaderForeground}"
                                    MonthContentHeaderBackground="{StaticResource brushMonthContentHeaderBackground}"
                                    MonthContentHeaderBorderBrush="{StaticResource brushMonthContentHeaderBorderBrush}"
                                    MonthContentHeaderBorderThickness="1,1,1,2"
                                    MonthContentBackground="{StaticResource brushMonthContentBackground}"
                                    MonthContentBorderBrush="{StaticResource brushMonthContentBorderBrush}"
                                    MonthContentBorderThickness="1"
                                    MonthCurrentDateHeaderForeground="{StaticResource brushMonthCurrentDateHeaderForeground}"
                                    MonthCurrentDateHeaderBackground="{StaticResource brushMonthCurrentDateHeaderBackground}"
                                    MonthCurrentDateHeaderBorderBrush="{StaticResource brushMonthCurrentDateHeaderBorderBrush}"
                                    MonthCurrentDateHeaderBorderThickness="1"
                                    MonthCurrentDateBackground="{StaticResource brushMonthCurrentDateBackground}"
                                    MonthCurrentDateBorderBrush="{StaticResource brushMonthCurrentDateBorderBrush}"
                                    MonthCurrentDateBorderThickness="1"
                                    MonthLegendForeground="{StaticResource brushMonthLegendForeground}"
                                    MonthLegendBackground="{StaticResource brushMonthLegendBackground}"
                                    MonthLegendBorderBrush="{StaticResource brushMonthLegendBorderBrush}"
                                    MonthLegendBorderThickness="1.5" />
                            </extended:DockPanel>
                        </Border>

                        <Canvas
                            Background="Black"
                            Opacity=".45"
                            Canvas.ZIndex="1"
                            Visibility="{TemplateBinding ShowAppointment}"
                            Height="{TemplateBinding Height}"
                            Width="{TemplateBinding Width}" />
                        <localAppCal:ucEditAppointment
                                x:Name="_Appointment"
                                Canvas.ZIndex="2"
                                Height="350"
                                Width="406"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Visibility="{TemplateBinding ShowAppointment}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Outlook Calendar Header -->
    <Style TargetType="localAppCal:ucHeader">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localAppCal:ucHeader">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="35" />
                            <RowDefinition Height="25" />
                        </Grid.RowDefinitions>

                        <StackPanel Orientation="Horizontal" Grid.Row="0">
                            <localButtons:ucGuideButton x:Name="btnDay" BorderBrush="Black" BorderThickness="1" ButtonType="Day" ButtonText="Day" Height="35" Width="50" />
                            <localButtons:ucGuideButton x:Name="btnWeek" BorderBrush="Black" BorderThickness="0,1,1,1" ButtonType="Week" ButtonText="Week" Height="35" Width="50" />
                            <localButtons:ucGuideButton x:Name="btnMonth" BorderBrush="Black" BorderThickness="0,1,1,1" ButtonType="Month" ButtonText="Month" Height="35" Width="50" />
                            <localButtons:ucGuideButton x:Name="btnYear" BorderBrush="Black" BorderThickness="0,1,1,1" ButtonType="Year" ButtonText="Year" Height="35" Width="50" />

                            <StackPanel Orientation="Horizontal" Visibility="{TemplateBinding WorkWeekDetails}" VerticalAlignment="Center">
                                <RadioButton x:Name="rbShowWorkWeek" IsChecked="true" Content="Show work week" Margin="15,0,0,0" />
                                <RadioButton x:Name="rbShowFullWeek" Content="Show full week" Margin="5,0,0,0" />
                            </StackPanel>
                        </StackPanel>

                        <StackPanel Orientation="Horizontal" Margin="5,0,0,0" Grid.Row="1">
                            <Button x:Name="btnPrevious" Height="25" Background="{x:Null}" BorderBrush="{x:Null}">
                                <Image Source="/SLControlLibrary;component/Resources.Images/Previous.png" />
                            </Button>
                            <Button x:Name="btnNext" Height="25" Background="{x:Null}" BorderBrush="{x:Null}" Margin="5,0,0,0">
                                <Image Source="/SLControlLibrary;component/Resources.Images/Next.png" />
                            </Button>

                            <TextBlock Text="{TemplateBinding DateInView}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10,0,0,0" />
                        </StackPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Outlook Days Of Week Item -->
    <Style TargetType="localAppCal:ucDayOfWeekContentItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localAppCal:ucDayOfWeekContentItem">
                    <Border
                        x:Name="brdRoot"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{TemplateBinding Background}"
                        Width="{TemplateBinding Width}">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>

                            <TextBlock
                                Grid.Column="0"
                                Text="{Binding Day}"
                                HorizontalAlignment="Left"
                                VerticalAlignment="Center"
                                TextAlignment="Center"
                                TextWrapping="NoWrap"
                                Margin="1.5,0,0,0"
                                Visibility="{TemplateBinding DisplayDay}"
                                />
                            <TextBlock
                                Grid.Column="1"
                                Text="{TemplateBinding DayString}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                TextAlignment="Center"
                                TextWrapping="NoWrap"
                                Margin="2,0,0,0"
                                />
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Outlook Days Of Week -->
    <Style TargetType="localAppCal:ucDaysOfWeek">
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <localAppCal:DayOfWeekItemsPanel />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localAppCal:ucDaysOfWeek">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <ItemsPresenter />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Outlook Content -->
    <Style TargetType="localAppCal:ucContent">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localAppCal:ucContent">
                    <ContentPresenter />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Outlook Time Slot Item -->
    <Style TargetType="localAppCal:ucTimeSlotItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localAppCal:ucTimeSlotItem">
                    <Border
                        x:Name="BrdRoot"
                        Width="52"
                        VerticalAlignment="Top"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Height="{TemplateBinding Height}">
                        <StackPanel
                            Orientation="Horizontal"
                            VerticalAlignment="Top"
                            HorizontalAlignment="Center">
                            <TextBlock
                                Foreground="#9493CF"
                                FontSize="16"
                                Margin="0,3,0,0"
                                VerticalAlignment="Top"
                                Text="{TemplateBinding Hour}"/>
                            <TextBlock
                                Foreground="#9493CF"
                                Margin="1.5,0,0,0"
                                VerticalAlignment="Top"
                                Text="{TemplateBinding Minute}" />
                        </StackPanel>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Outlook Time Slot -->
    <Style TargetType="localAppCal:ucTimeSlots">
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <StackPanel Orientation="Vertical" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localAppCal:ucTimeSlots">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <ItemsPresenter />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Outlook Day Content Item -->
    <Style TargetType="localAppCal:ucDayContentItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localAppCal:ucDayContentItem">
                    <Border
                        x:Name="brdRoot"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{TemplateBinding Background}"
                        Width="{TemplateBinding Width}"
                        Height="{TemplateBinding Height}">
                        <Grid>
                            <Border
                                x:Name="brdAddApp"
                                CornerRadius="4,4,4,4"
                                BorderThickness="1"
                                Visibility="{TemplateBinding HasAppointment}"
                                BorderBrush="{TemplateBinding DayContentHoverBorderBrush}"
                                Opacity="{TemplateBinding MouseOverOpacity}"
                                Background="{TemplateBinding DayContentHoverBackground}">
                                <TextBlock
                                    Text="Click to add appointment"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Foreground="{TemplateBinding DayContentForeground}" />
                            </Border>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Outlook Day Content -->
    <Style TargetType="localAppCal:ucDayContent">
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <StackPanel Orientation="Vertical" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localAppCal:ucDayContent">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <ScrollViewer
                            x:Name="svContent"
                            Padding="0"
                            BorderThickness="0,1,0,0"
                            BorderBrush="{StaticResource brushHourTimeBorder}">

                            <Grid>
                                <localAppCal:AppointmentItemsPanel x:Name="PART_AppointmentPanel" Canvas.ZIndex="2" Margin="52,0,0,0" />

                                <extended:DockPanel LastChildFill="True" Canvas.ZIndex="1">
                                    <localAppCal:ucTimeSlots
                                        x:Name="PART_TimeSlots"
                                        extended:DockPanel.Dock="Left"
                                        BorderThickness="0,0,0,1"
                                        BorderBrush="#4C535C"
                                        CurrentTimeBorderBrush="{StaticResource brushCurrentHourTimeBorder}"
                                        CurrentTimeBorderThickness="0,1,0,1"
                                        CurrentTimeBackground="{StaticResource brushCurrentHour}"
                                        ContentBackground="{StaticResource brushBackground}"
                                        ContentBorderBrush="{StaticResource brushHourTimeBorder}"
                                        ContentBorderThickness="0,1,0,0" />

                                    <ItemsPresenter />
                                </extended:DockPanel>
                            </Grid>
                        </ScrollViewer>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Outlook Week Content -->
    <Style TargetType="localAppCal:ucWeekContent">
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localAppCal:ucWeekContent">
                    <ScrollViewer
                        x:Name="svContent"
                        Padding="0"
                        BorderThickness="0,1,0,0"
                        BorderBrush="{StaticResource brushHourTimeBorder}">

                        <Grid>
                            <localAppCal:AppointmentItemsPanel x:Name="PART_AppointmentPanel" Canvas.ZIndex="2" />

                            <extended:DockPanel LastChildFill="True" Canvas.ZIndex="1">
                                <localAppCal:ucTimeSlots
                                        x:Name="PART_TimeSlots"
                                        extended:DockPanel.Dock="Left"
                                        BorderThickness="0,0,0,1"
                                        BorderBrush="#4C535C"
                                        CurrentTimeBorderBrush="{StaticResource brushCurrentHourTimeBorder}"
                                        CurrentTimeBorderThickness="0,1,0,1"
                                        CurrentTimeBackground="{StaticResource brushCurrentHour}"
                                        ContentBackground="{StaticResource brushBackground}"
                                        ContentBorderBrush="{StaticResource brushHourTimeBorder}"
                                        ContentBorderThickness="0,1,0,0" />

                                <ItemsPresenter />
                            </extended:DockPanel>
                        </Grid>
                    </ScrollViewer>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Outlook Month Content Item -->
    <Style TargetType="localAppCal:ucMonthContentItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localAppCal:ucMonthContentItem">
                    <Border
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{TemplateBinding Background}"
                        Width="{TemplateBinding Width}"
                        Height="{TemplateBinding Height}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="18"/>
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>

                            <Border
                                x:Name="brdHeader"
                                Grid.Row="0"
                                Cursor="Hand"
                                Width="Auto"
                                VerticalAlignment="Top"
                                Background="{TemplateBinding MonthContentHeaderBackground}"
                                BorderBrush="{TemplateBinding MonthContentHeaderBorderBrush}"
                                BorderThickness="{TemplateBinding MonthContentHeaderBorderThickness}">
                                <TextBlock
                                    VerticalAlignment="Top"
                                    HorizontalAlignment="Center"
                                    TextAlignment="Left"
                                    Text="{TemplateBinding DisplayText}"
                                    Foreground="{TemplateBinding MonthContentHeaderForeground}"
                                     />
                            </Border>
                            <Border
                                Grid.Row="1"
                                Background="{TemplateBinding MonthContentBackground}"
                                BorderBrush="{TemplateBinding MonthContentBorderBrush}"
                                BorderThickness="{TemplateBinding MonthContentBorderThickness}">
                                <StackPanel
                                    x:Name="spAppointments"
                                    Orientation="Vertical"
                                    Background="{TemplateBinding MonthContentBackground}" />
                            </Border>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Outlook Month Content -->
    <Style TargetType="localAppCal:ucMonthContent">
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <extended:WrapPanel />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localAppCal:ucMonthContent">
                    <ScrollViewer
                        x:Name="svContent"
                        Padding="0"
                        BorderThickness="0">
                        <Grid
                            HorizontalAlignment="Left"
                            VerticalAlignment="Top"
                            Margin="0">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="20" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>

                            <Grid
                                x:Name="grdMonthLegend"
                                Grid.Column="0" />

                            <ItemsPresenter
                                HorizontalAlignment="Right"
                                Grid.Column="1"/>
                        </Grid>
                    </ScrollViewer>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Outlook Year Content -->
    <Style TargetType="localAppCal:ucYearContent">
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <StackPanel Orientation="Vertical" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localAppCal:ucYearContent">
                    <ScrollViewer
                        x:Name="svContent"
                        Padding="0">
                        <Grid>
                            <ItemsPresenter x:Name="PART_ItemPresenter" />
                        </Grid>
                    </ScrollViewer>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Outlook Appointment Item -->
    <Style TargetType="localAppCal:ucAppointmentItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localAppCal:ucAppointmentItem" >
                    <Grid x:Name="Root" Margin="0">
                        <ToolTipService.ToolTip>
                            <ToolTip Background="Beige">
                                <ToolTip.Content>
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="15" />
                                            <RowDefinition Height="15" />
                                            <RowDefinition Height="15" />
                                            <RowDefinition Height="*" />
                                        </Grid.RowDefinitions>

                                        <StackPanel
                                            Grid.Row="0"
                                            Orientation="Horizontal">
                                            <TextBlock
                                                Margin="0,0,10,0"
                                                Text="Start Date: " />
                                            <TextBlock
                                                Margin="0,0,10,0"
                                                TextWrapping="Wrap"
                                                Text="{TemplateBinding StartDateDesc}" />
                                            <TextBlock
                                                Margin="0,0,30,0"
                                                Text="{TemplateBinding StartTimeDesc}" />
                                        </StackPanel>
                                        <StackPanel
                                            Grid.Row="1"
                                            Orientation="Horizontal">
                                            <TextBlock
                                                Margin="7,0,10,0"
                                                Text="End Date: " />
                                            <TextBlock
                                                Margin="0,0,10,0"
                                                Text="{TemplateBinding EndDateDesc}" />
                                            <TextBlock
                                                Text="{TemplateBinding EndTimeDesc}" />
                                        </StackPanel>

                                        <TextBlock
                                            Grid.Row="2"
                                            Margin="26,0,0,0"
                                            Text="Notes: " />
                                        <TextBlock
                                            Grid.Row="3"
                                            Height="Auto"
                                            Width="Auto"
                                            TextWrapping="Wrap"
                                            Margin="5"
                                            Text="{TemplateBinding Desc}" />
                                    </Grid>
                                </ToolTip.Content>
                            </ToolTip>
                        </ToolTipService.ToolTip>

                        <Rectangle
                            x:Name="rctShadow"
                            Margin="6,6,0,0"
                            RadiusX="6"
                            RadiusY="6"
                            Stroke="Black"
                            StrokeThickness="3"
                            Opacity=".2" />

                        <Border x:Name="brdRoot"
                                Margin="3,3,3,3"
                                BorderBrush="{TemplateBinding AppointmentBorderBrush}"
                                BorderThickness="{TemplateBinding AppointmentBorderThickness}"
                                CornerRadius="6"
                                Background="{TemplateBinding AppointmentBackground}">

                            <TextBlock
                                Height="Auto"
                                Width="Auto"
                                TextWrapping="Wrap"
                                Margin="5"
                                Text="{TemplateBinding Desc}"
                                Foreground="{TemplateBinding AppointmentForeground}" />
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Outlook Edit Appointment -->
    <Style TargetType="localAppCal:ucEditAppointment">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localAppCal:ucEditAppointment">
                    <Grid >
                        <Grid
                            Margin="1,11,12,8"
                            Background="{x:Null}">
                            <Rectangle
                                Margin="7,5,7,6"
                                Fill="#FF000000"
                                Stroke="#FF000000"
                                RadiusX="10"
                                RadiusY="10"/>
                            <Rectangle
                                Margin="13,10,12,11"
                                RadiusX="10"
                                RadiusY="10"
                                Fill="#FFD5D5D6"
                                Stroke="#FF000000"/>
                            <TextBlock
                                Height="16"
                                VerticalAlignment="Top"
                                Text="Start Date:"
                                TextAlignment="Right"
                                TextWrapping="Wrap"
                                Margin="19,23,0,0"
                                Width="72"
                                HorizontalAlignment="Left"/>
                            <TextBlock
                                HorizontalAlignment="Right"
                                Width="72"
                                Text="End Date:"
                                TextWrapping="Wrap"
                                Height="19"
                                VerticalAlignment="Top"
                                TextAlignment="Right"
                                Margin="0,22,129,0"/>
                            <TextBlock
                                HorizontalAlignment="Left"
                                Width="72"
                                Text="Start Time:"
                                TextWrapping="Wrap"
                                TextAlignment="Right"
                                Margin="19,49,0,0"
                                VerticalAlignment="Top"
                                Height="19"/>
                            <TextBlock
                                HorizontalAlignment="Right"
                                Width="72"
                                Text="End Time:"
                                TextWrapping="Wrap"
                                TextAlignment="Right"
                                Margin="0,49,129,0"
                                VerticalAlignment="Top"
                                Height="19"/>
                            <TextBlock
                                HorizontalAlignment="Left"
                                Width="72"
                                Text="Description:"
                                TextWrapping="Wrap"
                                TextAlignment="Right"
                                Margin="19,78,0,88"/>
                            <TextBlock
                                Height="19"
                                HorizontalAlignment="Left"
                                VerticalAlignment="Bottom"
                                Width="72"
                                Text="Importance:"
                                TextWrapping="Wrap"
                                TextAlignment="Right"
                                Margin="19,0,0,31" />
                            <TextBox
                                x:Name="txtDesc"
                                Margin="95,79,21,67"
                                Width="277"
                                TextWrapping="Wrap"
                                Text="{TemplateBinding Desc}"/>
                            <ComboBox
                                x:Name="cboImportance"
                                Height="27"
                                Margin="96,0,184,27"
                                VerticalAlignment="Bottom" />
                            <Button
                                x:Name="btnSubmit"
                                Height="23"
                                HorizontalAlignment="Right"
                                Margin="0,0,21,30"
                                VerticalAlignment="Bottom"
                                Width="74"
                                Content="Submit" />
                            <localDatePicker:ucDatePicker
                                x:Name="dpStartDate"
                                Canvas.ZIndex="4"
                                HorizontalAlignment="Left"
                                Margin="95,20,0,0"
                                VerticalAlignment="Top"
                                Background="{x:Null}"
                                SelectedDate="{TemplateBinding StartDate}"/>
                            <TextBox
                                x:Name="txtStartTime"
                                Canvas.ZIndex="2"
                                Margin="95,46,0,0"
                                Width="102"
                                VerticalAlignment="Top"
                                HorizontalAlignment="Left" />
                            <localDatePicker:ucDatePicker
                                x:Name="dpEndDate"
                                Canvas.ZIndex="3"
                                Margin="0,20,20,0"
                                VerticalAlignment="Top"
                                HorizontalAlignment="Right"
                                Background="{x:Null}"
                                SelectedDate="{TemplateBinding EndDate}"/>
                            <TextBox
                                x:Name="txtEndTime"
                                Canvas.ZIndex="1"
                                Width="102"
                                Margin="0,46,20,0"
                                VerticalAlignment="Top"
                                HorizontalAlignment="Right" />
                        </Grid>
                        <Ellipse
                            HorizontalAlignment="Right"
                            Margin="0,3,6,0"
                            Width="32"
                            Stroke="#FF000000"
                            x:Name="btnClose"
                            Height="31"
                            Cursor="Hand"
                            VerticalAlignment="Top">
                            <Ellipse.Fill>
                                <RadialGradientBrush SpreadMethod="Pad" GradientOrigin="0.5,0.5" MappingMode="RelativeToBoundingBox" Center="0.5,0.5">
                                    <GradientStop Color="#FFFF0000"/>
                                    <GradientStop Color="#FFFFFFFF" Offset="1"/>
                                </RadialGradientBrush>
                            </Ellipse.Fill>
                        </Ellipse>
                        <TextBlock
                            HorizontalAlignment="Right"
                            Margin="0,4,11,0"
                            Width="23"
                            Text="X"
                            Cursor="Hand"
                            TextWrapping="Wrap"
                            TextAlignment="Center"
                            FontSize="20"
                            Foreground="#FFFFFFFF"
                            x:Name="lblClose"
                            VerticalAlignment="Top"
                            Height="22"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>